<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .box{width: 200px;height: 200px;background-color: red;margin: 30px;}
  </style>
</head>
<body>
  <div class="box"></div>
</body>
<script>
  var box = document.querySelector(".box")

  box.onclick = function( eve ){
    // console.log( eve )
    // console.log(window.event);
    var e = eve || window.event;
    console.log(e);
  }

  
</script>
</html>